package com.wisezone.workflow.dao;

import java.util.List;

import com.wisezone.common.dao.BaseDao;
import com.wisezone.workflow.bean.WfActivity;
import com.wisezone.workflow.exception.WfDaoException;

/**
 * 活动接口
 * 
 * @author tss 2009-09-05
 * 
 */
public interface WfActivityDao extends BaseDao {

	/**
	 * 获得中间活动列表
	 * 
	 * @param processDefId
	 * @return
	 * @throws WfDaoException
	 */
	public List<WfActivity> getMiddleList(Long processDefId)
			throws WfDaoException;

	/**
	 * 获得非开始活动列表
	 * 
	 * @param processDefId
	 * @return
	 * @throws WfDaoException
	 */
	public List<WfActivity> getNotStartList(Long processDefId)
			throws WfDaoException;

	/**
	 * 根据活动Id 获得下一活动
	 */
	public WfActivity getNextActivity(Long activityId) throws WfDaoException;

	/**
	 * 根据活动id 和下一活动名称活动下一活动
	 * 
	 * @param aid
	 *            活动id
	 * @param name
	 *            下一活动名称
	 * @return
	 * @throws WfDaoException
	 */
	public WfActivity getNextActivity(Long activityId, String name)
			throws WfDaoException;

	/**
	 * 根据流程模板Id删除
	 * 
	 * @param id
	 * @throws WfDaoException
	 */
	public void deleteByProcessDefId(Long id) throws WfDaoException;

}